package lesson3.slides.text;

import java.text.MessageFormat;
import java.text.ParsePosition;

public class StringParsingExample {

    public static void main(String[] args) {
        MessageFormat mf = new MessageFormat("{0,date,short}, {1}, {2,number}");
        String forParsing = "1/12/12, What is this, 99.99";
        Object[] objs = mf.parse(forParsing, new ParsePosition(0));
        for (Object o : objs) {
            System.out.println("o is " + o
                    + " class:" + o.getClass().getName());
        }
    }
    
}